//===========================================================================
// Validations
// Removing of redundant and mutually exclusive flags to prevent generating
// of the vertex/pixel shaders
// TODO: make special validations for PS.1.1 only support

#if %SPECULAR_NCM && %VIEWVEC_NCM
    #undefine %VIEWVEC_NCM
    #warning Parameter _VIEWVEC_NCM was ignored
#endif

#if !%GLOSS_MAP
  #if %SPECULARPOW_GLOSSALPHA
      #undefine %SPECULARPOW_GLOSSALPHA 
  #endif
#endif

#if %DIFFUSE_PERPIXEL
  #if %DIFFUSE_NCM
    #undefine %DIFFUSE_NCM
    #warning Parameter _DIFFUSE_NCM was ignored
  #endif
#endif

#if %ALPHAGLOW && %DIFFUSEALPHA
    #undefine %DIFFUSEALPHA
    #warning Parameter _DIFFUSEALPHA was ignored
#endif

#if %PARALLAX_OCCLUSION_MAPPING
#if %PHONG_TESSELLATION
	#undefine %PHONG_TESSELLATION
#endif
#if %PN_TESSELLATION
	#undefine %PN_TESSELLATION
#endif
#if %DISPLACEMENT_MAPPING
	#undefine %DISPLACEMENT_MAPPING
#endif
#endif

#if %PHONG_TESSELLATION || %PN_TESSELLATION || %DISPLACEMENT_MAPPING
	#if !VS_TESSELLATION
		#if %PHONG_TESSELLATION
			#undefine %PHONG_TESSELLATION
		#endif
		#if %PN_TESSELLATION
			#undefine %PN_TESSELLATION
		#endif
		#if %DISPLACEMENT_MAPPING
			#undefine %DISPLACEMENT_MAPPING
		#endif
	#endif
#endif

#if VS_TESSELLATION
	#if !%PHONG_TESSELLATION && !%PN_TESSELLATION && !%DISPLACEMENT_MAPPING
		#undefine VS_TESSELLATION
	#endif
#endif

#if %BLENDLAYER
	#if %DIRTLAYER	
		#undefine %DIRTLAYER
	#endif
	#if %DECAL
		#undefine %DECAL
	#endif
#endif

#if %ALPHAGLOW
  #if %ALPHAMASK_DETAILMAP
    #undefine %ALPHAMASK_DETAILMAP
  #endif
#endif

#if %GLOSS_MAP
	#if %GLOSS_DIFFUSEALPHA
		#undefine %GLOSS_DIFFUSEALPHA
	#endif
#endif

#if XENON || PS3
#if %PARALLAX_OCCLUSION_MAPPING
	#undefine %PARALLAX_OCCLUSION_MAPPING
#endif
#endif
